<template>
  <div class="widget">
    <Echarts :id="id" :option="option" />
  </div>

</template>
<script>

import Echarts from "@/views/dashboard/EditDashboard/common/Echarts"

const baseEchartOption = {
  "xAxis": {
      "gridIndex": 0,
      "show": true,
      "position": "bottom",
      "type": "category",
      "name": "",
      "nameTextStyle": {
          "fontFamily": "system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",
          "fontSize": 12,
          "color": "#000000"
      },
      "nameLocation": "",
      "data": [
          "上海区",
          "京津区",
          "西南区"
      ],
      "axisLine": {
          "show": true
      },
      "splitLine": {
          "show": true
      },
      "axisTick": {
          "show": true,
          "length": 14
      }
  },
  "tooltip": {
      "trigger": "axis",
      "axisPointer": {
          "type": "shadow"
      }
  },
  "yAxis": {
      "show": true,
      "position": "top",
      "type": "value",
      "name": "",
      "nameLocation": "",
      "nameTextStyle": {
          "fontFamily": "system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",
          "fontSize": 12,
          "color": "#000000"
      },
      "axisLine": {
          "show": true
      },
      "splitLine": {
          "show": true
      },
      "axisTick": {
          "show": true
      }
  },
  "legend": {
      "show": false,
      "left": "center",
      "right": "auto",
      "top": "top",
      "bottom": "auto",
      "width": "auto",
      "height": "auto",
      "orient": "horizontal",
      "textStyle": {
          "fontFamily": "system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",
          "fontSize": 12
      }
  },
  "series": [
      {
          "name": "cp1xsje",
          "enName": "cp1xsje",
          "type": "bar",
          "label": {
              "show": true,
              "position": "top",
              "rotate": 0,
              "offset": [
                  0,
                  0
              ]
          },
          "itemStyle": {
              "opacity": 1,
              "color": "#c23531",
              "borderRadius": [
                  0,
                  0,
                  0,
                  0
              ]
          },
          "data": [
              {
                  "name": "上海区",
                  "value": 29825000,
                  "label": {
                      "formatter": "29825000"
                  }
              },
              {
                  "name": "京津区",
                  "value": 45314500,
                  "label": {
                      "formatter": "45314500"
                  }
              },
              {
                  "name": "西南区",
                  "value": 16706500,
                  "label": {
                      "formatter": "16706500"
                  }
              }
          ]
      },
      {
          "name": "hkje",
          "enName": "hkje",
          "type": "bar",
          "label": {
              "show": true,
              "position": "top",
              "rotate": 0,
              "offset": [
                  0,
                  0
              ]
          },
          "itemStyle": {
              "opacity": 1,
              "color": "rgba(185,21,35,1)",
              "borderRadius": [
                  0,
                  0,
                  0,
                  0
              ]
          },
          "data": [
              {
                  "name": "上海区",
                  "value": 38823401074,
                  "label": {
                      "formatter": "38823401074"
                  }
              },
              {
                  "name": "京津区",
                  "value": 60335683225,
                  "label": {
                      "formatter": "60335683225"
                  }
              },
              {
                  "name": "西南区",
                  "value": 21556953785,
                  "label": {
                      "formatter": "21556953785"
                  }
              }
          ]
      }
  ],
  "backgroundColor": "transparent"
}

export default {
  props: {
    id: {
      type: String,
    },
    option: {
      type: Object,
      default: () => baseEchartOption
    }
  },
  data () {
    return {
    }
  },
  methods: {
  },

  mounted () {

  },
  components: {
    Echarts
  },
}
</script>

<style scoped lang="less" >

</style>
